﻿@model XAPI.Domain.Statement
@{
    ViewBag.Title = "TinCan.net";
    ViewBag.Message = "Open source xApi services";
}
@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>@ViewBag.Title.</h1>
                <h2>@ViewBag.Message</h2>
            </hgroup>
            <p>
                To learn more about xApi, visit 
                <a href="http://www.adlnet.gov/tla/experience-api" title="ADL Website">http://www.adlnet.gov/tla/experience-api</a>.
                <br />
                The xApi specification -
                <a href="http://www.adlnet.gov/wp-content/uploads/2013/04/20130426_xAPI_v1.0.0-FINAL.pdf">ADL xApi specification pdf</a>
            </p>
        </div>
    </section>
}

@using (Html.BeginForm())
{
<div id="tabs">
    <ul>
    <li><a href="#tabs-1">Actor</a></li>
    <li><a href="#tabs-2">Verb</a></li>
    <li><a href="#tabs-3">Object</a></li>
    </ul>
    <div id="tabs-1">
    @Html.EditorFor(x => x.actor)
    </div>
    <div id="tabs-2">
    @Html.LabelFor(x => x.verb) 
    @Html.EditorFor(x => x.verb)
    </div>
    <div id="tabs-3">
    @Html.LabelFor(x => x.xObject) 
    @Html.EditorFor(x => x.xObject)
    </div>
</div>
    
<input type="submit" value="Submit" />
}

<h3>Current statements in the store:</h3>
<ul>
@if (ViewBag.Statements != null)
{
    var statements = (List<XAPI.Domain.Statement>)ViewBag.Statements;
    foreach (var item in statements)
    {
        <li>
            <span class="actor">@Json.Encode(item)</span>
        </li>
    }
}
</ul>

@section scripts
{
<script type="text/javascript">
    $(document).ready(function () {
        $("#tabs").tabs();
    });
</script>
}